
// 方便覆盖 原
.chat-pc {
  overflow: hidden;

  &__header {
    background: var(--app-header-bg-color);
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 100;
    height: var(--app-header-height);
    line-height: var(--app-header-height);
    box-sizing: border-box;
    border-bottom: 1px solid var(--el-border-color);
  }

  &__left {
    padding-top: calc(var(--app-header-height) - 8px);
    background: #ffffff;
    width: 280px;

    .add-button {
      border: 1px solid var(--el-color-primary);
    }

    .left-height {
      height: calc(100vh - var(--app-header-height) - 135px);
    }
  }

  &__right {
    width: calc(100% - 280px);
    padding-top: calc(var(--app-header-height));
    overflow: hidden;
    position: relative;
    box-sizing: border-box;

    .right-header {
      background: #ffffff;
      box-sizing: border-box;
    }

    .right-height {
      height: calc(100vh - var(--app-header-height) * 2 - 24px);
    }
  }

  .gradient-divider {
    position: relative;
    text-align: center;
    color: var(--el-color-info);

    ::before {
      content: '';
      width: 17%;
      height: 1px;
      background: linear-gradient(90deg, rgba(222, 224, 227, 0) 0%, #dee0e3 100%);
      position: absolute;
      left: 16px;
      top: 50%;
    }

    ::after {
      content: '';
      width: 17%;
      height: 1px;
      background: linear-gradient(90deg, #dee0e3 0%, rgba(222, 224, 227, 0) 100%);
      position: absolute;
      right: 16px;
      top: 50%;
    }
  }

  .collapse {
    display: none;
  }
}
// 适配移动端
.mobile {
  .chat-pc {
    &__right {
      width: 100%;
    }
    &__left {
      display: none;
      width: 0;
    }
  }
  .collapse {
    display: block;
    position: fixed;
    bottom: 90px;
    z-index: 99;
  }
  &.openLeft {
    .chat-pc {
      &__left {
        display: block;
        position: fixed;
        width: 100%;
        z-index: 99;
        height: calc(100vh - var(--app-header-height) + 6px);
      }
    }
    .collapse {
      display: block;
      position: absolute;
      bottom: 90px;
      right: 0;
      z-index: 99;
    }
  }
}

.chat-width {
  max-width: 80%;
  margin: 0 auto;
}
@media only screen and (max-width: 1000px) {
  .chat-width {
    max-width: 100% !important;
    margin: 0 auto;
  }
}

.fade-and-width-enter-active, .fade-and-width-leave-active {
  transition: opacity 0.5s, width 0.5s;
}
.fade-and-width-enter, .fade-and-width-leave-to {
  opacity: 0;
  width: 0; /* 初始宽度为0，可以根据需要调整 */
}

.chat-pc-new {
  .flex-row {
    display: flex;
    flex-direction: row;
    height: 100vh;
    .left {
      width: 224px;
      background: #fff;
      border-radius: 16px;
      padding: 12px;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      align-items: center;
      transition: width .3s ease; /* 添加过渡效果 */
      .top-icon {
        width: 14px;
        height: 14px;
        cursor: pointer;
        margin-bottom: 12px;
        margin-top: 4px;
        transform: rotate(180deg);
      }
      &-title {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #191919;
        font-size: 14px;
        padding-left: 4px;
        margin-bottom: 12px;
        img {
          margin-right: 6px;
          cursor: pointer;
        }
      }

      &-content {
        height: 100%;
        overflow: auto;
        cursor: pointer;
        &-item {
          display: flex;
          padding: 12px 20px 12px 16px;
          border-radius: 12px;
          margin-bottom: 10px;
          &-left {
            width: 36px;
            //height: 36px;
            margin-right: 8px;
          }
          &-right {
            flex: 1;
            margin-right: 8px;
            &-title {
              color: #191919;
              font-size: 14px;
              max-width: 106px;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
            }
            &-time {
              color: #8C8C8C;
              font-size: 12px;
            }
          }
          &-more {
            position: absolute;
            width: 20px;
            top: 11.5px;
            right: -10px;
            display: flex;
            flex-direction: row;
            justify-content: center;
          }
        }
        &-item:hover {
          background: #F4F8FF;
        }
        .active {
          background: #F4F8FF;
        }
      }
      .flex-1 {
        width: 100%;
        flex: 1;
        overflow-y: auto;
      }
      .left-add {
        width: 100%;
        height: 32px;
        margin-top: 50px;
        border-radius: 20px 20px 20px 20px;
        margin-bottom: 10px;
        .button {
          color: #3067EF;
        }
      }
      /* 进入过渡的开始状态和结束状态 */
      .fade-enter-active, .fade-leave-active {
        transition: opacity 1s; /* 定义过渡效果，这里是透明度的变化 */
      }
      /* 进入过渡的结束状态 */
      .fade-enter-from, .fade-leave-to {
        opacity: 0; /* 开始时完全透明 */
      }
    }
    .right {
      flex: 1;
      margin: 0 auto;
      .right-height {
        height: 100%;
        overflow-y: auto;
        .ai-chat {
          display: flex;
          flex-direction: column;
          .el-scrollbar {
            flex: 1;
          }
        }
      }

    }
  }
}

.hideLeft {
  .left {
    width: 90px !important;
    text-align: center;
    padding: 8px 12px !important;
    &-content {
      height: calc(100% - 30px);
      &-item {
        padding: 8px 12px !important;
        box-sizing: border-box;
        &-left {
          margin-right: 0!important;
        }
      }
    }
  }
}
